﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace CPPEI.ETL.Domain.Util
{
    class RegexUtil
    {
        /// <summary>
        /// 字母开头，字母数字_组成的格式
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        public static bool IsName(string name)
        {
            Regex regex = new Regex(@"^[a-zA-Z][a-zA-z0-9_]*$");
            if(regex.IsMatch(name))
            {
                return true;
            }
            return false;
        }
    }
}
